package br.ufrj.dcc.mapaviolencia.job;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import br.ufrj.dcc.mapaviolencia.business.TwitterBusiness;

public class TwitterJob implements Job {
	
	Logger logger = LoggerFactory.getLogger(TwitterJob.class);

	TwitterBusiness twitterBusiness = new TwitterBusiness();

	public void execute(JobExecutionContext context) {
		try {
			twitterBusiness.searchAndSaveLatestTweets();
		} catch (Exception e) {
			logger.error("Falha ao executar job.", e);
		}
	}
	
}
